/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.targeter.rulesengine.model;

import com.liferay.portal.model.ModelWrapper;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * This class is a wrapper for {@link rules}.
 * </p>
 *
 * @author    jsalaice
 * @see       rules
 * @generated
 */
public class rulesWrapper implements rules, ModelWrapper<rules> {
	public rulesWrapper(rules rules) {
		_rules = rules;
	}

	public Class<?> getModelClass() {
		return rules.class;
	}

	public String getModelClassName() {
		return rules.class.getName();
	}

	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("ruleId", getRuleId());
		attributes.put("model", getModel());
		attributes.put("ruleName", getRuleName());
		attributes.put("active", getActive());
		attributes.put("drlFile", getDrlFile());

		return attributes;
	}

	public void setModelAttributes(Map<String, Object> attributes) {
		Long ruleId = (Long)attributes.get("ruleId");

		if (ruleId != null) {
			setRuleId(ruleId);
		}

		String model = (String)attributes.get("model");

		if (model != null) {
			setModel(model);
		}

		String ruleName = (String)attributes.get("ruleName");

		if (ruleName != null) {
			setRuleName(ruleName);
		}

		Boolean active = (Boolean)attributes.get("active");

		if (active != null) {
			setActive(active);
		}

		String drlFile = (String)attributes.get("drlFile");

		if (drlFile != null) {
			setDrlFile(drlFile);
		}
	}

	/**
	* Returns the primary key of this rules.
	*
	* @return the primary key of this rules
	*/
	public long getPrimaryKey() {
		return _rules.getPrimaryKey();
	}

	/**
	* Sets the primary key of this rules.
	*
	* @param primaryKey the primary key of this rules
	*/
	public void setPrimaryKey(long primaryKey) {
		_rules.setPrimaryKey(primaryKey);
	}

	/**
	* Returns the rule ID of this rules.
	*
	* @return the rule ID of this rules
	*/
	public long getRuleId() {
		return _rules.getRuleId();
	}

	/**
	* Sets the rule ID of this rules.
	*
	* @param ruleId the rule ID of this rules
	*/
	public void setRuleId(long ruleId) {
		_rules.setRuleId(ruleId);
	}

	/**
	* Returns the model of this rules.
	*
	* @return the model of this rules
	*/
	public java.lang.String getModel() {
		return _rules.getModel();
	}

	/**
	* Sets the model of this rules.
	*
	* @param model the model of this rules
	*/
	public void setModel(java.lang.String model) {
		_rules.setModel(model);
	}

	/**
	* Returns the rule name of this rules.
	*
	* @return the rule name of this rules
	*/
	public java.lang.String getRuleName() {
		return _rules.getRuleName();
	}

	/**
	* Sets the rule name of this rules.
	*
	* @param ruleName the rule name of this rules
	*/
	public void setRuleName(java.lang.String ruleName) {
		_rules.setRuleName(ruleName);
	}

	/**
	* Returns the active of this rules.
	*
	* @return the active of this rules
	*/
	public boolean getActive() {
		return _rules.getActive();
	}

	/**
	* Returns <code>true</code> if this rules is active.
	*
	* @return <code>true</code> if this rules is active; <code>false</code> otherwise
	*/
	public boolean isActive() {
		return _rules.isActive();
	}

	/**
	* Sets whether this rules is active.
	*
	* @param active the active of this rules
	*/
	public void setActive(boolean active) {
		_rules.setActive(active);
	}

	/**
	* Returns the drl file of this rules.
	*
	* @return the drl file of this rules
	*/
	public java.lang.String getDrlFile() {
		return _rules.getDrlFile();
	}

	/**
	* Sets the drl file of this rules.
	*
	* @param drlFile the drl file of this rules
	*/
	public void setDrlFile(java.lang.String drlFile) {
		_rules.setDrlFile(drlFile);
	}

	public boolean isNew() {
		return _rules.isNew();
	}

	public void setNew(boolean n) {
		_rules.setNew(n);
	}

	public boolean isCachedModel() {
		return _rules.isCachedModel();
	}

	public void setCachedModel(boolean cachedModel) {
		_rules.setCachedModel(cachedModel);
	}

	public boolean isEscapedModel() {
		return _rules.isEscapedModel();
	}

	public java.io.Serializable getPrimaryKeyObj() {
		return _rules.getPrimaryKeyObj();
	}

	public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
		_rules.setPrimaryKeyObj(primaryKeyObj);
	}

	public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
		return _rules.getExpandoBridge();
	}

	public void setExpandoBridgeAttributes(
		com.liferay.portal.service.ServiceContext serviceContext) {
		_rules.setExpandoBridgeAttributes(serviceContext);
	}

	@Override
	public java.lang.Object clone() {
		return new rulesWrapper((rules)_rules.clone());
	}

	public int compareTo(com.targeter.rulesengine.model.rules rules) {
		return _rules.compareTo(rules);
	}

	@Override
	public int hashCode() {
		return _rules.hashCode();
	}

	public com.liferay.portal.model.CacheModel<com.targeter.rulesengine.model.rules> toCacheModel() {
		return _rules.toCacheModel();
	}

	public com.targeter.rulesengine.model.rules toEscapedModel() {
		return new rulesWrapper(_rules.toEscapedModel());
	}

	@Override
	public java.lang.String toString() {
		return _rules.toString();
	}

	public java.lang.String toXmlString() {
		return _rules.toXmlString();
	}

	public void persist()
		throws com.liferay.portal.kernel.exception.SystemException {
		_rules.persist();
	}

	/**
	 * @deprecated Renamed to {@link #getWrappedModel}
	 */
	public rules getWrappedrules() {
		return _rules;
	}

	public rules getWrappedModel() {
		return _rules;
	}

	public void resetOriginalValues() {
		_rules.resetOriginalValues();
	}

	private rules _rules;
}